package com.v2.k2;


import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;

/**
 * 测试XmlBeanDefinitionReader 可以用来解析<bean>标签
 */
public class Test2 {

	public static void main(String[] args) {

		DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();
		XmlBeanDefinitionReader xmlBeanDefinitionReader = new XmlBeanDefinitionReader(beanFactory);

		int i = xmlBeanDefinitionReader.loadBeanDefinitions("spring2.xml");

		System.out.println("i="+i+" ; "+beanFactory.getBean("user"));

	}

}
